<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {% load staticfiles %}
    <link rel="stylesheet" href="/static/bootstrap-3.3.7-dist/css/bootstrap.min.css">
</head>
<body>
    <ul>
        {% for row in data %}
            <li>{{ row.name }}---{{ row.age }}</li>
        {% endfor %}
    </ul>
    {% for i in page_obj.pager_num_range %}
        <a href="/index2/?p={{ i }}">{{ i }}</a>
    {% endfor %}
    <hr>


    <ul class="pagination pagination-sm">
      {{ page_obj.page_str| safe }}
    </ul>

    <script src="/static/jquery-3.3.1.js"></script>
    <script src="/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

</body>
</html>